package com.jjyu.controller;

import com.jjyu.entity.Inventory;
import com.jjyu.entity.Result;
import com.jjyu.service.InventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inventory")
public class InventoryController {
    @Autowired
    private InventoryService inventoryService;

    /**
     * 餐厅添加库存
     */
    @PostMapping("/add")
    public Result<String> addInventory(Inventory inventory) {
        boolean save = inventoryService.save(inventory);
        return Result.success("添加成功");
    }
}
